<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>11.1.JS对象-创建对象-字面量对象</title>
    <script>
        // 使用字面量的形式创建一个名字为可可的狗对象
        var dog = {
            uname: '可可',
            type: '哈士奇',
            age: '5岁',
            color: '棕红色',
            skill: function () {
                console.log('bark');
                console.log('showFlim');
            }
        };
        console.log(dog.uname);
        console.log(dog['type']);
        console.log(dog.age);
        console.log(dog['color']);
        dog.skill();
    </script>
</head>

<body>

</body>

</html>